﻿Imports System.Web
Imports System.Data
Imports System.Collections
Imports System.Data.OleDb


Public Class connection

    Public Function open() As OleDbConnection


        Dim con As OleDbConnection
        Dim constr As String

        constr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\dbInternetSales1.accdb;Jet OLEDB:Database Password=Bertha1325;Persist Security Info=False;"


        con = New OleDbConnection(constr)
        con.Open()

        Return con

    End Function
    Public Function ConnectionString()
        Dim constr As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\dbInternetSales1.accdb;Jet OLEDB:Database Password=Bertha1325;Persist Security Info=False;")
        Return constr
    End Function

    Public Function close()

        Dim con As OleDbConnection
        Dim constr As String

        constr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\dbInternetSales1.accdb;Jet OLEDB:Database Password=Bertha1325;Persist Security Info=False;"


        con = New OleDbConnection(constr)
        con.Close()

        Return con

    End Function

End Class